<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <%@include file="/WEB-INF/pages/common/taglib.jsp" %>
    <%@include file="/WEB-INF/pages/common/common.jsp" %>
    <style>
        .table3 tr {
            height: 40px;
            line-height: 40px;
            border: 1px #ccc solid
        }
    </style>
</head>
<body>
<div class="content content_frame">
    <h3 class="mainTitle"><img src="${basePath}/images/icon2.png"/>订单信息明细</h3>
    <br/>
    <ul class="contentNav dib-wrap">
        <li class="dib">
            <a onclick="javascript:history.go(-1)">
                <i class='fa fa-reply'></i>&nbsp;&nbsp;返&nbsp;回 </a>
        </li>
    </ul>
    <br/>
    <input type="hidden" name="indx" value="${orderHead.id}">
    <table class="table3">
        <tr>
            <th colspan="4">订单基本信息</th>
        </tr>
        <tr>
            <td width="15%">订单编号</td>
            <td width="35%">
                <label>${orderHead.orderNo}</label>
            </td>
            <td width="15%">订单类型</td>
            <td width="35%">
                <label>${func:dictItem('ieType', orderHead.orderType)}</label>
            </td>
        </tr>
        <tr>
            <td>电商平台代码</td>
            <td>
                <label>${orderHead.ebpCode}</label>
            </td>
            <td>电商平台名称</td>
            <td>
                <label>${orderHead.ebpName}</label>
            </td>
        </tr>
        <tr>
            <td>电商企业代码</td>
            <td>
                <label>${orderHead.ebcCode}</label>
            </td>
            <td>电商企业名称</td>
            <td>
                <label>${orderHead.ebcName}</label>
            </td>
        </tr>
        <tr>
            <td>货款金额</td>
            <td>
                <label>${orderHead.goodsValue}</label>
            </td>
            <td>运杂费</td>
            <td>
                <label>${ orderHead.freight}</label>
            </td>
        </tr>
        <tr>
            <td>优惠减免金额</td>
            <td>
                <label>${orderHead.discount}</label>
            </td>
            <td>订单商品税款</td>
            <td>
                <label>${ orderHead.taxTotal}</label>
            </td>
        </tr>
        <tr>
            <td>实际支付金额</td>
            <td>
                <label>${orderHead.acturalPaid}</label>
            </td>
            <td>币制</td>
            <td>
                <label>${ orderHead.currencyDisplay}</label>
            </td>
        </tr>
        <tr>
            <td>订购人注册号</td>
            <td>
                <label>${orderHead.buyerRegNo}</label>
            </td>
            <td>订购人姓名</td>
            <td>
                <label>${ orderHead.buyerName}</label>
            </td>
        </tr>
        <tr>
            <td>订购人证件类型</td>
            <td>
                <label>${'1' eq orderHead.buyerIdType?'身份证':'其他'}</label>
            </td>

            <td>订购人证件号码</td>
            <td>
                <label>${ orderHead.buyerId}</label>
            </td>
        </tr>
        <tr>
            <td>支付企业代码</td>
            <td>
                <label>${orderHead.payCode}</label>
            </td>

            <td>支付企业名称</td>
            <td>
                <label>${ orderHead.payName}</label>
            </td>
        </tr>
        <tr>
            <td>支付交易编号</td>
            <td>
                <label>${orderHead.payTransactionId}</label>
            </td>

            <td>商品批次号</td>
            <td>
                <label>${ orderHead.batchNumbers}</label>
            </td>
        </tr>
        <tr>
            <td>收货人姓名</td>
            <td>
                <label>${orderHead.consignee}</label>
            </td>

            <td>收货人电话</td>
            <td>
                <label>${ orderHead.consigneePhone}</label>
            </td>
        </tr>
        <tr>
            <td>收货人地址</td>
            <td>
                <label>${orderHead.consigneeAddr}</label>
            </td>

            <td>收货人行政区划代码</td>
            <td>
                <label>${ orderHead.consigneeDistrict}</label>
            </td>
        </tr>
        <tr>
            <%--<td>操作结果</td>--%>
            <%--<td>--%>
            <%--<label>${orderHead.sendStatus}</label>--%>
            <%--</td>--%>

            <td>状态</td>
            <td>
                <label>${func:dictItem('RETURN_STATUS_JN', orderHead.status)}</label>
            </td>
            <%--</tr>--%>
            <%--<tr>--%>
            <%--<td>申报时间</td>--%>
            <%--<td>--%>
            <%--<label>${orderHead.createDate}</label>--%>
            <%--</td>--%>

            <td>状态时间</td>
            <td>
                <label>${ orderHead.statusTime}</label>
            </td>
        </tr>
        <tr>
            <td>申报时间</td>
            <td>
                <label>${orderHead.appDate}</label>
            </td>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td>备注</td>
            <td colspan="3">
                <label>${orderHead.note}</label>
            </td>
        </tr>
    </table>
    <br/>

    <div class="title">订单商品信息列表</div>
    <table id="goodsList"></table>
    <div id="goodsListPage">
    </div>
    <br/>
</div>
</body>
<script type="text/javascript">
    $(function () {
        $(".table3 td:even").css("background-color", "#f5f5f5");

        $("#goodsList").jqGrid({
            datatype: "local",
            data: JSON.parse('${goodsListJSON}'),
            colNames: ['商品序号', '企业商品货号', '企业商品名称', '企业商品描述', '条码', '单位', '币制', '数量', '单价', '总价', '原产国', '备注'],
            colModel: [
                {name: 'gNum', index: 'gNum'},
                {name: 'itemNo', index: 'itemNo'},
                {name: 'itemName', index: 'itemName'},
                {name: 'itemDescribe', index: 'itemDescribe'},
                {name: 'barCode', index: 'barCode'},
                {name: 'unit', index: 'unit'},
                {name: 'currencyDisplay', index: 'currencyDisplay'},
                {name: 'qty', index: 'qty'},
                {name: 'price', index: 'price'},
                {name: 'totalPrice', index: 'totalPrice'},
                {name: 'countryDisplay', index: 'countryDisplay'},
//                {name: 'createDate', index: 'createDate'},
                {name: 'note', index: 'note'}
            ],
            viewrecords: true, // show the current page, data rang and total records on the toolbar
            height: 'auto',
            autowidth: true,
            shrinkToFit: false,
            autoScroll: true,
            rowNum: 10, //每页显示记录数
            rowList: [10, 20, 100], //可调整每页显示的记录数
            width: $('body').width(),
            pager: "#goodsListPage", //分页工具栏

            loadComplete: function () {
                var rowNum = $(this).jqGrid('getGridParam', 'records');
                if (rowNum <= 0) {
                    if ($(this).parent().children('.norecords').length == 0)
                        $(this).parent().append("<div class=\"norecords\">暂无数据！</div>");
                    $(this).parent().children('.norecords').show();
                }
                else {//如果存在记录，则隐藏提示信息。
                    $(this).parent().children('.norecords').hide();
                }
                $("#goodsList").setGridWidth($(window).width() * 0.98);
                $(".ui-jqgrid tr.ui-row-ltr td").css('text-align', 'center');
            }
        });

        $("#waybillList").jqGrid({
            datatype: "local",
            data: JSON.parse('${waybillListJSON}'),
            colNames: ['运单号', '物流公司代码'],
            colModel: [
                {name: 'waybillId', index: 'waybillId'},
                {name: 'logiEnteCode', index: 'logiEnteCode'}
            ],
            viewrecords: true, // show the current page, data rang and total records on the toolbar
            height: 'auto',
            autowidth: true,
            shrinkToFit: false,
            autoScroll: true,
            rowNum: 10, //每页显示记录数
            rowList: [10, 20, 100], //可调整每页显示的记录数
            width: $('body').width(),
            pager: "#waybillListPage", //分页工具栏

            loadComplete: function () {
                var rowNum = $(this).jqGrid('getGridParam', 'records');
                if (rowNum <= 0) {
                    if ($(this).parent().children('.norecords').length == 0)
                        $(this).parent().append("<div class=\"norecords\">暂无数据！</div>");
                    $(this).parent().children('.norecords').show();
                }
                else {//如果存在记录，则隐藏提示信息。
                    $(this).parent().children('.norecords').hide();
                }
                $("#waybillList").setGridWidth($(window).width() * 0.98);
                $(".ui-jqgrid tr.ui-row-ltr td").css('text-align', 'center');
            }
        });

        $(window).resize(function () {
            $("#waybillList,#goodsList").setGridWidth($(window).width() * 0.98);
        });
    });
</script>
</html>
